﻿using LibNiconico.NiconicoApi.Extentions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;

namespace LibNiconico.NiconicoApi.Internal
{
    /// <summary>
    /// ニコニコXmlSocketチャットコメント
    /// </summary>
    public abstract class NicoXmlSocketChatComment:NicoChatCommentBase
    {
        /// <summary>
        /// dateusecパラメタ
        /// </summary>
        public long DateUsec { get; private set; }

        /// <summary>
        /// コメントを解析
        /// </summary>
        /// <param name="comment"></param>
        /// <param name="message"></param>
        protected static void Parse(NicoXmlSocketChatComment comment, XElement message)
        {
            NicoChatCommentBase.Parse(comment, message);

            comment.DateUsec = XElementExtention.GetAttributeAsLong(message, "date_usec");
        }
    }
}
